package online.heycm.platform.rocketmq.common.handler;

import lombok.extern.slf4j.Slf4j;
import online.heycm.platform.rocketmq.common.entity.Event;
import online.heycm.platform.rocketmq.common.entity.EventState;

/**
 * 默认本地事务处理器
 *
 * @author heycm
 * @since 2023/11/29 21:29
 */
@Slf4j
public class DefaultLocalTransactionHandler implements LocalTransactionHandler {

    @Override
    public EventState executeLocalTransaction(Event event) {
        log.info("DefaultLocalTransactionHandler execute commit.");
        return EventState.COMMIT;
    }

    @Override
    public EventState checkLocalTransaction(Event event) {
        log.info("DefaultLocalTransactionHandler check commit.");
        return EventState.COMMIT;
    }
}
